const express = require('express');
const router = express.Router();
const uploadController = require('../controllers/uploadController');
const authMiddleware = require('../middlewares/authMiddleware');

// 上传头像 (需要认证)
router.post('/avatar', authMiddleware, uploadController.avatarUpload, uploadController.uploadAvatar);

// 注册用户上传头像 (不需要认证)
router.post('/register-avatar', uploadController.avatarUpload, uploadController.uploadAvatar);

module.exports = router; 